package it.basilikos.core.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PersistenceContext;
import javax.persistence.Table;

import org.hibernate.validator.internal.util.privilegedactions.GetAnnotationParameter;

@Entity
@PersistenceContext
@Table(name="sell")
public class Sell extends BaseEntity{

	private static final long serialVersionUID = 1131734885742165708L;

	
	@Column
	private Date date;
	
	@Column
	private double amount;

	@OneToOne
//	@JoinColumn(name="agent_id",referencedColumnName="id",insertable=false,updatable=false)
	private Agent agent;
	
	public Sell(){}
	
	public Sell(Date date, double amount) {
		super();
		this.date = date;
		this.amount = amount;
	}
	
	
	public Agent getAgent() {
		return agent;
	}
	public void setAgent(Agent agent) {
		this.agent = agent;
	}
	
	
	
	
}
